/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vistas;

import beans.Categoria;
import daos.classes.CategoriaDAOImp;
import daos.interfaces.CategoriaDAO;

import beans.Producto;
import daos.classes.ProductoDAOImp;
import daos.interfaces.ProductoDAO;

import java.awt.BorderLayout;
import java.awt.Button;

import java.awt.FlowLayout;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;


public class Actualizar extends JFrame{
  
    private CategoriaDAO dao;
    private ProductoDAO daop;
    private JPanel panel;
    private JList lista;
    private DefaultListModel listModel;
  private JTextField id_categoria, nombre;
  private JButton modificar;
   
    {
        dao=new CategoriaDAOImp();
        try {
            dao.conectar();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, e.getMessage());
        }
    }
    public Actualizar() throws HeadlessException {
        super("Actualizar");
        setResizable(false);
        setSize(500,200);
        panel= new JPanel();
        panel.setLayout(new GridLayout(6,4));
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        
      
       id_categoria = new JTextField( 20 );
       panel.add( id_categoria );
 
      nombre = new JTextField( 20 );
      panel.add( nombre );
 
     

      modificar = new JButton( "Modificar" );
      modificar.setBounds(new Rectangle(20, 20, 50, 45));
      panel.add( modificar );

      
      
      
        add(BorderLayout.EAST,panel);
      
        setVisible(true);
    }
    
    public static void main(String[] args) {
        new Actualizar();
    }
}